<?php
abstract class LoginObserver implements Observer{
	private $login;

	function __construct(Login $login){
		$this->login = $login;
		$login->attach($this);
	}

	function update( $observable){
		if($observable === $this->login){
			$this->doUpdate($observable);
		}
	}

	abstract function doUpdate(Login $login);
}